package com.arconsh.designPatterns.singleton;

/**
 * Created by wangyakun on 2017/2/28.
 */
public class Singleton02 {
    private Singleton02(){
        System.out.println("create Singleton02 instance...");
    }

    private static final Singleton02 single = new Singleton02();

    public static Singleton02 getIntence(){
        return single;
    }

    public void test(){
        System.out.println("singleton02 test...");
    }
}

class Singleton02Demo{
    public static void main(String[] args) {
        Singleton02 singleton02 = Singleton02.getIntence();

        singleton02.test();
    }

}
